home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / mc51bugs / q37794 < prev    next >
Text File  |  1988-11-14  |  919b  |  39 lines

  1. Q37794 gcvt Generates Exponential Notation for 0.0123
  2. C Compiler
  3. 5.10   | 5.10
  4. MS-DOS | OS/2
  5.  
  6. Summary:
  7.  
  8. The gcvt() function returns an exponential number in the string even
  9. if the number fits in the specified precision when the number is of
  10. the form 0.0x, where x is any digit(s).
  11.  
  12. Microsoft has confirmed this to be a problem in Version 5.10. We are
  13. researching this problem and will post new information as it becomes
  14. available.
  15.  
  16. More Information:
  17.  
  18. The following code demonstrates this problem:
  19.  
  20.  #include <stdio.h>
  21.  #include <stdlib.h>
  22.  
  23.  
  24.  char buffer[50];
  25.  int precision=20;
  26.  
  27.  
  28.  main()
  29.  {
  30.      gcvt(-0.1123,precision,buffer);    /* will give decimal output*/
  31.      printf("buffer ........\"%s\"\n",buffer);
  32.  
  33.      gcvt(-0.0123,precision,buffer);    /* will give exponential output*/
  34.      printf("buffer ........\"%s\"\n",buffer);
  35.  }
  36.  
  37. Keywords:  buglist5.10
  38. Updated  88/11/15 06:14
  39.